<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="../../css/style.css">
    <script src="../../jquery/jquery-3.4.1.min.js"></script>

</head>
<body class="container" style="font-family: '微软雅黑 Light'">

<div class="col-md-offset-1" style="padding-bottom: 50px;font-family: 幼圆">
    <h1 style="padding-top: 10px;color: #0a0a0a">消息通知</h1>
    <hr>
    <h4 style="color: cornflowerblue;">全部商品</h4>
    <div class="row" style="height: 50px; background-color:#e2e2e2">
        <div class="col-md-offset-2 col-md-2"><label style="padding-top: 14px">商品信息</label></div>
        <div class="col-md-offset-1 col-md-1"><label style="padding-top: 14px">联系人</label></div>
        <div class="col-md-offset-1 col-md-1"><label style="padding-top: 14px">联系方式</label></div>
        <div class="col-md-offset-1 col-md-1"><label style="padding-top: 14px">订单状态</label></div>
    </div>
    <div id="com"></div>


</div>
</body>
<script>
    var html = "";
    $(document).ready(function () {
        showShop();

        function showShop() {
            if (sessionStorage.getItem("u_id") != null) {
                $.ajax({
                    url: "../../book/selectById",
                    type: "get",
                    dataType: "json",
                    data: {
                        u_id: sessionStorage.getItem("u_id")
                    },
                    success: function (result) {
                        var html = "";

                        for (var i = 0; i < result.length; i++) {

                            html +="<div class=\"row\" style=\"padding-top: 5px;padding-bottom: 5px;color: #204d74\">\n" +
                                "        <div class=\" col-md-4\"><label style=\"padding-left: 60px; padding-top: 14px\">"+result[i].b_carname+"</label></div>\n" +
                                "        <div class=\"col-md-offset-1 col-md-1\"><label style=\"padding-top: 14px\">"+result[i].b_username+"</label></div>\n" +
                                "        <div class=\"col-md-offset-1 col-md-1\"><label style=\"padding-top: 14px\">"+result[i].b_phone+"</label></div>\n" +
                                "        <div class=\"col-md-offset-1 col-md-1\"><label style=\"padding-top: 14px;color: #ac2925\">"+result[i].u_status+"</label></div>\n" +
                                "    </div>" +
                                "<hr>";
                        }

                        $("#com").html(html);
                    }

                })
            } else {
                alert("请先登录");
            }
        }
    })

</script>
</html>